﻿
$(function () {
    fantian();
    
})
function fantian() {
    // 发送AJAX请求获取数据
    console.log(localStorage.getItem("WorkOrderId"))
            $.ajax({
                type: "get",
                url: "/Manufacture/FabPurch",
                data: {
                    WorkOrderId: localStorage.getItem("WorkOrderId"),
                    token: localStorage.getItem("token")
                },
                success: function (res) {
                    var ter = JSON.parse(res)
                    console.log(ter.Data)

                    $(ter.Data).each(function () {
                        $('#WorkOrderCode').val(this.WorkOrderCode);
                        $('#Customer').val(this.Customer);
                        $('#ProductionNumber').val(this.ProductionNumber);
                        $('#OrderCode').val(this.OrderCode);
                     
                        $('#Notes').val(this.Notes);
                        $('#FinishedProduct').val(this.FinishedProduct);
                        $('#FinishedProductCode').val(this.FinishedProductCode);
                        $('#Specification').val(this.Specification);
                        $('#Size').val(this.Size);
                        $('#Unit').val(this.Unit);
                        $('#WorkShop').val(this.WorkShop);
                        $('#Production').val(this.Production);
                        $('#StartDate').val(this.StartDate);
                        $('#EndDate').val(this.EndDate);
                        $('#ProcessRoute').val(this.ProcessRoute);
                        $('#Priority').val(this.Priority);
                        $('#CreateTime').val(this.CreatedDate);
                        $('#Creates').val(this.CreatedBy);
                        $('#WorkOrderSart').val(this.WorkOrderSart);
                    })
                  
                },
               
            });
         
    
}



